// SCENARIO SCRIPT

// This is the special script for your entire scenario. It contains
// special encounters and code accessable from anywhere in the scenario. it also
// contains the code that initializes important special things in the
// scenario (like shops and names and descriptions of special items).

// You can create your own states, but you should give all of them numbers greater than
// or equal to 10.

beginscenarioscript;

variables;

body;

beginstate LOAD_SCEN_STATE;
// This is the state that is called every time the scenario is loaded,
// even when a save file in the scenario is loaded. Some things that should go here:
//    Names and descriptions of special items.
//    Names and effects of custom special abilities.

init_quest(0,"Uncover Murderer","There has been a murder at Fort Bluebird. Commander Hollie wants you to go down there, speak to the administrator, and then return and report to her.");
init_quest(1,"Go to Fort Bluebird","There has been another attack at Fort Bluebird. The area has been locked down, and the murderer is still inside. You are to go and apprehend him.");
init_quest(2,"Report to Commander Hollie","You are to see Commander Hollie in Fort Orchid to get the exact details of your mission. She is in the barracks.");

init_special_item(1,"Steel key.","You found this key Jessica's body, after you slew her. It should open most of the doors in Fort Bluebird.");

//turn_on_debug_mode();

break;

beginstate START_SCEN_STATE;
// This is the state that is called only once at the very beginning of 
// the scenario. Some things that should go here:
//    The stuff in shops.
//    Creating horses and boats.

//Shops

//Luke's Archery Supplies
add_item_to_shop(0,85,15);
add_item_to_shop(0,86,5);
add_item_to_shop(0,90,6);
add_item_to_shop(0,91,1);
add_item_to_shop(0,95,1);
add_item_to_shop(0,100,10);
add_item_to_shop(0,101,3);
add_item_to_shop(0,105,10);
add_item_to_shop(0,106,2);

//Bill's Weapons
add_item_to_shop(1,46,10);
add_item_to_shop(1,51,3);
add_item_to_shop(1,55,3);
add_item_to_shop(1,56,1);
add_item_to_shop(1,65,2);
add_item_to_shop(1,66,1);
add_item_to_shop(1,81,7);
add_item_to_shop(1,82,2);
add_item_to_shop(1,152,6);
add_item_to_shop(1,159,1);

//Bill's Armour
add_item_to_shop(2,25,4);
add_item_to_shop(2,26,2);
add_item_to_shop(2,30,2);
add_item_to_shop(2,31,1);
add_item_to_shop(2,121,3);
add_item_to_shop(2,122,2);
add_item_to_shop(2,127,1);
add_item_to_shop(2,137,3);
add_item_to_shop(2,141,2);
add_item_to_shop(2,146,1);

//Rosaline's Alchemy
add_item_to_shop(3,4000,1);
add_item_to_shop(3,4001,1);
add_item_to_shop(3,4002,1);
add_item_to_shop(3,4003,1);

//Father Maher's Priest Spells
add_item_to_shop(4,3000,2);
add_item_to_shop(4,3001,2);
add_item_to_shop(4,3002,2);
add_item_to_shop(4,3003,1);
add_item_to_shop(4,3004,2);
add_item_to_shop(4,3005,2);
add_item_to_shop(4,3006,1);
add_item_to_shop(4,3007,1);

//Grant's Miscellany
add_item_to_shop(5,114,2);
add_item_to_shop(5,171,10);
add_item_to_shop(5,172,5);
add_item_to_shop(5,174,6);
add_item_to_shop(5,175,2);
add_item_to_shop(5,177,3);
add_item_to_shop(5,391,2);
add_item_to_shop(5,16,2);

toggle_quest(2,1);

set_creature_type_level(62,10);

create_boat(1,1,29,6,1);

break;

beginstate START_STATE;
// This state is called every tick wherever the party is in the scenario.
// You can use the set_state

if(get_current_tick() % 5000 == 0) {
	set_flag(1,1,0); //reset the altar in Fort Orchid.
}
break;

// Place your own states below. Give each a number at least 10.

beginstate 10;
break;
